<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title></title>
    <link href="libs/weui/weuix.min.css" rel="stylesheet" />
    <link href="libs/swipe/swiper.min.css" rel="stylesheet" />
    <link href="css/common.css" rel="stylesheet"/>
    <link href="css/set.css" rel="stylesheet" />
    <title>商家认证</title>
</head>
<body class="page-bg">
<div class="weui_btn_warn weui-header">
    <div class="weui-header-left"> <a href="javascript:window.history.go(-1);" class="icon icon-109 f-white"></a>  </div>
    <h1 class="weui-header-title">商家认证</h1>
    <div class="weui-header-right">
        <!--<a class="icon icon-22 f-white"></a>-->
    </div>
</div>
<div class="set-box">
    <form id="form">
        <div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" required="" pattern="" maxlength="11" placeholder="法定代表人姓名" emptytips="法定代表人姓名" notmatchtips="请输入正确的姓名">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="number" required="" pattern="[0-9]{18}" maxlength="18" placeholder="法定代表人身份证号" emptytips="法定代表人身份证号" notmatchtips="请输入正确身份证号">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
        </div>
        <div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" required="" pattern="" maxlength="11" placeholder="企业名称" emptytips="企业名称" notmatchtips="请输入正确的企业名称">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" required="" pattern="" maxlength="11" placeholder="营业执照号" emptytips="营业执照号" notmatchtips="请输入正确的营业执照">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" required="" pattern="" maxlength="11" placeholder="组织机构代码" emptytips="组织机构代码" notmatchtips="请输入正确的组织机构代码">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
        </div>
        <div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" placeholder="营业执照所在省市" value="" id='ssx'/>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <textarea id="textarea" class="weui_textarea" placeholder="请详细地址" rows="3"></textarea>
                    <div class="weui_textarea_counter"><span id="count">0</span>/<span id="count_max">20</span></div>
                </div>
            </div>
        </div>
        <div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <ul class="weui_uploader_files">
                    <li class="weui_uploader_file">

                    </li>
                </ul>
                <div class="weui_uploader_input_wrp">
                    <input class="weui_uploader_input" type="file" accept="image/*" multiple="" />
                    <span class="txt">身份证正面</span>
                </div>
                <div class="weui_uploader_input_wrp">
                    <input class="weui_uploader_input" type="file" accept="image/*" multiple="" />
                    <span class="txt">身份证反面</span>
                </div>
                <div class="weui_uploader_input_wrp">
                    <input class="weui_uploader_input" type="file" accept="image/*" multiple="" />
                    <span class="txt">营业执照</span>
                </div>
            </div>
            <div class="weui_cell">
                <div class="uploader-tips">
                    <p>上传法定代表人身份证与营业执照照片，并确定上面信息清晰可见。</p>
                </div>
            </div>
        </div>
        <div class="weui_btn_area">
            <a id="formSubmitBtn" href="javascript:" class="weui_btn weui_btn_red">提交</a>
        </div>
    </form>
</div>
</body>

<script type="text/javascript" src="libs/zepto/zepto.min.js"></script>
<script type="text/javascript" src="libs/common/picker.js"></script>
<script type="text/javascript" src="libs/common/picker-city.js"></script>

<script>
    $("#ssx").cityPicker({
        title: "选择省市县"
    });
    var max = $('#count_max').text();
    $('#textarea').on('input', function(){
        var text = $(this).val();
        var len = text.length;
        $('#count').text(len);
        if(len > max){
            $(this).closest('.weui_cell').addClass('weui_cell_warn');
        }
        else{
            $(this).closest('.weui_cell').removeClass('weui_cell_warn');
        }
    });

</script>
</html>